package cn.bby.query.base.model.req;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @author ben
 * @since 2025/4/12 02:12
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class Filter {
    /**
     * 字段名
     */
    @NotBlank
    private String field;

    /**
     * 条件
     */
    private String condition = "eq";

    /**
     * 值
     */
    @NotEmpty
    private List<String> values;

    public Filter(String field, String condition, List<String> values) {
        this.field = field;
        this.condition = condition;
        this.values = values;
    }
}
